require('../css/advert.less')

window.onload = function () {
    let time = document.querySelector('.time')
    let skip = document.querySelector('.skip')
    let num = 5
    let timer = setInterval(function () {
        num--
        if (num <= 0) {
            clearInterval(timer)
            location.href = 'login.html'
        }
        time.innerHTML = num + 's'
    }, 1000)
    skip.addEventListener('click', function () {
        location.href = 'login.html'
    })
}